package com.young.netty.gateway.exception;

/**
 * NettyGateway异常
 *
 * @author Young
 * @Date 2021-07-24 19:45
 */
public class NettyGatewayException extends RuntimeException {

    private String errorCode;

    private String message;

    public NettyGatewayException(ErrorCodeEnum errorCodeEnum) {
        this.errorCode = errorCodeEnum.getCode();
        this.message = errorCodeEnum.getMessage();
    }

    public NettyGatewayException(String errorCode, String message) {
        this.errorCode = errorCode;
        this.message = message;
    }
}
